Provides a maximal-coordinate dynamics adapter for serial and parallel linkages. Link mass properties and joint attachment frames are converted into the rigid bodies and holonomic constraints required by the variational integrator.
Constructs a dynamic model from a serial linkage and a compatible set of joint variables. Every serial link is treated as a moving rigid body; the proximal joint of the first link is attached to ground.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(serial_linkage), | intent(in) | :: | mechanism |
The serial linkage to convert. |
||
| real(kind=real64), | intent(in), | dimension(:) | :: | q |
One joint variable for each link. |
The resulting dynamic model.
Constructs a dynamic model from a parallel or planar linkage. The mechanism's base link remains fixed and all other links become moving maximal-coordinate rigid bodies.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(kinematic_mechanism), | intent(in) | :: | mechanism |
The parallel linkage to convert. |
||
| real(kind=real64), | intent(in), | dimension(:) | :: | q |
The complete, constraint-compatible joint-variable array. |
The resulting dynamic model.
Computes a prescribed angular displacement as a function of time.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | t |
The simulation time. |
||
| class(*), | intent(inout), | optional | :: | args |
A mechanism for passing information in/out of this routine. |
The prescribed absolute angle, in radians.
Defines the instantaneous state and scalar force of an axial element.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=real64), | public | :: | force | = | 0.0d0 |
The signed force acting on body 1 toward body 2. |
|
| real(kind=real64), | public | :: | length | = | 0.0d0 |
The current distance between attachment points. |
|
| real(kind=real64), | public | :: | length_rate | = | 0.0d0 |
The relative attachment velocity along the element axis. |
Defines an extensible force element between two attachment points. The element force acts along the line from point 1 to point 2. Body index zero denotes a fixed ground point whose coordinates are expressed in world coordinates. Subtypes override evaluate_force to compute a force from the current length and length rate.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | public | :: | body_1 | = | 0 |
The one-based body index for the first attachment point, or zero for a ground point. |
|
| integer(kind=int32), | public | :: | body_2 | = | 0 |
The one-based body index for the second attachment point, or zero for a ground point. |
|
| real(kind=real64), | public, | dimension(3) | :: | point_1 | = | 0.0d0 |
The first attachment point in body_1 coordinates, or in world coordinates when body_1 is zero. |
| real(kind=real64), | public, | dimension(3) | :: | point_2 | = | 0.0d0 |
The second attachment point in body_2 coordinates, or in world coordinates when body_2 is zero. |
| procedure , public :: evaluate_force => axial_zero_force Function | Returns the signed axial force for a given element length and length rate. The base implementation returns zero. |
Describes one joint constraint in maximal-coordinate body indexing. Body index zero denotes the fixed ground link. Each frame is a homogeneous transform from its associated body frame to the joint frame; for a ground body, the frame is expressed directly in world coordinates. The parent and child joint frames coincide when the joint constraint is satisfied.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | public | :: | child_body | = | 0 |
The one-based maximal-coordinate body index on the child side, or zero for the fixed ground link. |
|
| real(kind=real64), | public, | dimension(4,4) | :: | child_frame |
Homogeneous transform locating and orienting the joint frame in the child body frame, or in world coordinates when child_body is zero. |
||
| integer(kind=int32), | public | :: | joint_type | = | REVOLUTE_JOINT |
The joint kind, using one of the joint-type constants from dynamics_joints. |
|
| integer(kind=int32), | public | :: | parent_body | = | 0 |
The one-based maximal-coordinate body index on the parent side, or zero for the fixed ground link. |
|
| real(kind=real64), | public, | dimension(4,4) | :: | parent_frame |
Homogeneous transform locating and orienting the joint frame in the parent body frame, or in world coordinates when parent_body is zero. |
Defines the constraint reaction exerted by a joint on its child link. Both vectors are expressed in the world coordinate frame. The reaction exerted on the parent link is equal and opposite.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=real64), | public, | dimension(3) | :: | force | = | 0.0d0 |
The joint reaction force. |
| real(kind=real64), | public, | dimension(3) | :: | moment | = | 0.0d0 |
The joint reaction moment about the joint center. |
Defines a linear viscous damper acting only along the element axis.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | public | :: | body_1 | = | 0 |
The one-based body index for the first attachment point, or zero for a ground point. |
|
| integer(kind=int32), | public | :: | body_2 | = | 0 |
The one-based body index for the second attachment point, or zero for a ground point. |
|
| real(kind=real64), | public | :: | damping | = | 0.0d0 |
The force per unit axial relative velocity. |
|
| real(kind=real64), | public, | dimension(3) | :: | point_1 | = | 0.0d0 |
The first attachment point in body_1 coordinates, or in world coordinates when body_1 is zero. |
| real(kind=real64), | public, | dimension(3) | :: | point_2 | = | 0.0d0 |
The second attachment point in body_2 coordinates, or in world coordinates when body_2 is zero. |
| procedure , public :: evaluate_force => linear_damper_force Function |
Defines a linear axial spring supporting tension and compression.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | public | :: | body_1 | = | 0 |
The one-based body index for the first attachment point, or zero for a ground point. |
|
| integer(kind=int32), | public | :: | body_2 | = | 0 |
The one-based body index for the second attachment point, or zero for a ground point. |
|
| real(kind=real64), | public | :: | free_length | = | 0.0d0 |
The zero-force element length, including preload definition. |
|
| real(kind=real64), | public, | dimension(3) | :: | point_1 | = | 0.0d0 |
The first attachment point in body_1 coordinates, or in world coordinates when body_1 is zero. |
| real(kind=real64), | public, | dimension(3) | :: | point_2 | = | 0.0d0 |
The second attachment point in body_2 coordinates, or in world coordinates when body_2 is zero. |
| real(kind=real64), | public | :: | stiffness | = | 0.0d0 |
The force per unit extension. |
| procedure , public :: evaluate_force => linear_spring_force Function |
Defines the variational-integrator representation of a linkage. Body index zero in a joint descriptor denotes the fixed ground link.
| private function ldm_from_serial (mechanism, q) | Constructs a dynamic model from a serial linkage and a compatible set of joint variables. Every serial link is treated as a moving rigid body; the proximal joint of the first link is attached to ground. |
| private function ldm_from_parallel (mechanism, q) | Constructs a dynamic model from a parallel or planar linkage. The mechanism's base link remains fixed and all other links become moving maximal-coordinate rigid bodies. |
| procedure , public :: add_axial_element => ldm_add_axial_element Subroutine | |
| procedure , public :: add_linear_damper => ldm_add_linear_damper Subroutine | |
| procedure , public :: add_linear_spring => ldm_add_linear_spring Subroutine | |
| procedure , public :: add_torsional_damper => ldm_add_torsional_damper Subroutine | |
| procedure , public :: add_torsional_element => ldm_add_torsional_element Subroutine | |
| procedure , public :: add_torsional_spring => ldm_add_torsional_spring Subroutine | |
| procedure , public :: constraint_residual => ldm_constraint_residual Function | |
| procedure , public :: get_axial_element_count => ldm_get_axial_count Function | |
| procedure , public :: get_axial_element_results => ldm_get_axial_results Function | |
| procedure , public :: get_body_count => ldm_get_body_count Function | |
| procedure , public :: get_constraint_count => ldm_get_constraint_count Function | |
| procedure , public :: get_initial_state => ldm_get_initial_state Function | |
| procedure , public :: get_joint_count => ldm_get_joint_count Function | |
| procedure , public :: get_joint_reactions => ldm_get_joint_reactions Function | |
| procedure , public :: get_torsional_element_count => ldm_get_torsional_count Function | |
| procedure , public :: get_torsional_element_results => ldm_get_torsional_results Function | |
| procedure , public :: solve => ldm_solve Function |
Defines a linear damper opposing only joint-axis twist rate.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=real64), | public | :: | damping | = | 0.0d0 |
The torque per unit relative angular velocity. |
|
| integer(kind=int32), | public | :: | joint_index | = | 0 |
The one-based revolute-joint index whose axis the element uses. |
| procedure , public :: evaluate_torque => torsional_damper_torque Function |
Defines the instantaneous twist state and torque of a torsional element.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=real64), | public | :: | angle | = | 0.0d0 |
The signed joint angle, in radians. |
|
| real(kind=real64), | public | :: | angle_rate | = | 0.0d0 |
The relative twist rate about the revolute-joint axis. |
|
| real(kind=real64), | public | :: | torque | = | 0.0d0 |
The signed torque applied to the child body about the joint axis. |
Defines an extensible torsional element bound to a revolute joint.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | public | :: | joint_index | = | 0 |
The one-based revolute-joint index whose axis the element uses. |
| procedure , public :: evaluate_torque => torsional_zero_torque Function |
Defines a linear torsional spring about a revolute-joint axis.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=real64), | public | :: | free_angle | = | 0.0d0 |
The zero-torque relative joint angle, in radians. |
|
| integer(kind=int32), | public | :: | joint_index | = | 0 |
The one-based revolute-joint index whose axis the element uses. |
|
| real(kind=real64), | public | :: | stiffness | = | 0.0d0 |
The torque per unit angular displacement. |
| procedure , public :: evaluate_torque => torsional_spring_torque Function |